Skip to contentSkip to conversation

Change in openvpn[master]: Disable clang-format for some code parts

Openvpn-devel In review flichtenheld (Code Review) 2 participants 6 messages Mar 19, 2025 – Aug 4, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1733837528000.I4dd0c44982955f16ec4a3f167d4e6f3e9b4dbc11@...2715...

#1 lore raw

Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/829?usp=email

to review the following change.

Change subject: Disable clang-format for some code parts
......................................................................

Disable clang-format for some code parts

These do not come out better with clang-format,
so leave them be.

Change-Id I4dd0c44982955f16ec4a3f167d4e6f3e9b4dbc11

---
M src/openvpn/ssl_common.h
M src/tapctl/main.c

2 files changed, 4 insertions(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/29/829/3

src/openvpn/ssl_common.h +2 -1
index 4e54001..97c5041 100644
@@ -75,6 +75,7 @@
  *
  * @{
  */
+/* clang-format off */
 #define S_ERROR         (-2)    /**< Error state.  */
 #define S_ERROR_PRE     (-1)    /**< Error state but try to send out alerts
                                  *  before killing the keystore and moving
@@ -102,7 +103,7 @@
 #define S_GENERATED_KEYS  7     /**< The data channel keys have been generated
                                  *  The TLS session is fully authenticated
                                  *  when reaching this state. */
-
+/* clang-format on */
 /* Note that earlier versions also had a S_OP_NORMAL state that was
  * virtually identical with S_ACTIVE and the code still assumes everything
  * >= S_ACTIVE to be fully operational */
src/tapctl/main.c +2 -0
index 551a8e6..d27da6b 100644
@@ -37,6 +37,7 @@
 #endif
 
 
+/* clang-format off */
 const WCHAR title_string[] =
     _L(PACKAGE_NAME) L" " _L(PACKAGE_VERSION)
 ;
@@ -111,6 +112,7 @@
     L"\n"
     L"tapctl delete <adapter GUID | adapter name>\n"
 ;
+/* clang-format on */
 
 
 /**

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/829?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4dd0c44982955f16ec4a3f167d4e6f3e9b4dbc11
Gerrit-Change-Number: 829
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld, plaisthos.

cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/829?usp=email )

Change subject: Disable clang-format for some code parts
......................................................................

Patch Set 12: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/829?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4dd0c44982955f16ec4a3f167d4e6f3e9b4dbc11
Gerrit-Change-Number: 829
Gerrit-PatchSet: 12
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Mon, 04 Aug 2025 09:09:57 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

#3 lore raw

PATCH v12 1/1 Disable clang-format for some code parts

In reply to a message not in the archive

From: Frank Lichtenheld <[email protected]...>

These do not come out better with clang-format,
so leave them be.

Change-Id I4dd0c44982955f16ec4a3f167d4e6f3e9b4dbc11

---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/829
This mail reflects revision 12 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>

src/openvpn/ssl_common.h +2 -1
index e9e50da..e9dd5f2 100644
@@ -75,6 +75,7 @@
  *
  * @{
  */
+/* clang-format off */
 #define S_ERROR         (-2)    /**< Error state.  */
 #define S_ERROR_PRE     (-1)    /**< Error state but try to send out alerts
                                  *  before killing the keystore and moving
@@ -105,7 +106,7 @@
 #define S_GENERATED_KEYS  8     /**< The data channel keys have been generated
                                  *  The TLS session is fully authenticated
                                  *  when reaching this state. */
-
+/* clang-format on */
 /* Note that earlier versions also had a S_OP_NORMAL state that was
  * virtually identical with S_ACTIVE and the code still assumes everything
  * >= S_ACTIVE to be fully operational */
src/tapctl/main.c +2 -0
index 58ab8cc..a67540d 100644
@@ -37,6 +37,7 @@
 #endif
 
 
+/* clang-format off */
 const WCHAR title_string[] =
     _L(PACKAGE_NAME) L" " _L(PACKAGE_VERSION)
 ;
@@ -111,6 +112,7 @@
     L"\n"
     L"tapctl delete <adapter GUID | adapter name>\n"
 ;
+/* clang-format on */
 
 
 /**
#4 lore raw

[Openvpn-devel] [PATCH applied] Re: Disable clang-format for some code parts

What it says... this just adds 2x two magic comments that tell clang-format "leave this section alone". Sometimes table-like stuff just doesn't work very well with auto-formatting...

Your patch has been applied to the master branch.

commit d22f247d6c68283526ddd4ce32ab677209bf56e0

Author: Frank Lichtenheld
Date:   Mon Aug 4 11:10:21 2025 +0200
     Disable clang-format for some code parts

     Signed-off-by: Frank Lichtenheld <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg32492.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#5 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#13) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/829?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by cron2

Change subject: Disable clang-format for some code parts
......................................................................

Disable clang-format for some code parts

These do not come out better with clang-format,
so leave them be.

Change-Id I4dd0c44982955f16ec4a3f167d4e6f3e9b4dbc11

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32492.html

---
M src/openvpn/ssl_common.h
M src/tapctl/main.c

2 files changed, 4 insertions(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/29/829/13

src/openvpn/ssl_common.h +2 -1
index 90c0086..1fdc187 100644
@@ -74,6 +74,7 @@
  *
  * @{
  */
+/* clang-format off */
 #define S_ERROR         (-2)    /**< Error state.  */
 #define S_ERROR_PRE     (-1)    /**< Error state but try to send out alerts
                                  *  before killing the keystore and moving
@@ -104,7 +105,7 @@
 #define S_GENERATED_KEYS  8     /**< The data channel keys have been generated
                                  *  The TLS session is fully authenticated
                                  *  when reaching this state. */
-
+/* clang-format on */
 /* Note that earlier versions also had a S_OP_NORMAL state that was
  * virtually identical with S_ACTIVE and the code still assumes everything
  * >= S_ACTIVE to be fully operational */
src/tapctl/main.c +2 -0
index 82caeaf..0dec303 100644
@@ -36,6 +36,7 @@
 #endif
 
 
+/* clang-format off */
 const WCHAR title_string[] =
     _L(PACKAGE_NAME) L" " _L(PACKAGE_VERSION)
 ;
@@ -110,6 +111,7 @@
     L"\n"
     L"tapctl delete <adapter GUID | adapter name>\n"
 ;
+/* clang-format on */
 
 
 /**

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/829?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4dd0c44982955f16ec4a3f167d4e6f3e9b4dbc11
Gerrit-Change-Number: 829
Gerrit-PatchSet: 13
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset

#6 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/829?usp=email )

Change subject: Disable clang-format for some code parts
......................................................................

Disable clang-format for some code parts

These do not come out better with clang-format,
so leave them be.

Change-Id I4dd0c44982955f16ec4a3f167d4e6f3e9b4dbc11

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32492.html

---
M src/openvpn/ssl_common.h
M src/tapctl/main.c

2 files changed, 4 insertions(+), 1 deletion(-)
src/openvpn/ssl_common.h +2 -1
index 90c0086..1fdc187 100644
@@ -74,6 +74,7 @@
  *
  * @{
  */
+/* clang-format off */
 #define S_ERROR         (-2)    /**< Error state.  */
 #define S_ERROR_PRE     (-1)    /**< Error state but try to send out alerts
                                  *  before killing the keystore and moving
@@ -104,7 +105,7 @@
 #define S_GENERATED_KEYS  8     /**< The data channel keys have been generated
                                  *  The TLS session is fully authenticated
                                  *  when reaching this state. */
-
+/* clang-format on */
 /* Note that earlier versions also had a S_OP_NORMAL state that was
  * virtually identical with S_ACTIVE and the code still assumes everything
  * >= S_ACTIVE to be fully operational */
src/tapctl/main.c +2 -0
index 82caeaf..0dec303 100644
@@ -36,6 +36,7 @@
 #endif
 
 
+/* clang-format off */
 const WCHAR title_string[] =
     _L(PACKAGE_NAME) L" " _L(PACKAGE_VERSION)
 ;
@@ -110,6 +111,7 @@
     L"\n"
     L"tapctl delete <adapter GUID | adapter name>\n"
 ;
+/* clang-format on */
 
 
 /**

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/829?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4dd0c44982955f16ec4a3f167d4e6f3e9b4dbc11
Gerrit-Change-Number: 829
Gerrit-PatchSet: 13
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged